<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
// BiDi with quotations in single line
const kStyle = 'width: 600px; font: 20px monospace';
const isMac = navigator.platform.indexOf('Mac') === 0;
const kBehaviors = window.internals ? ['mac', 'win'] : isMac ? ['mac'] : ['win'];
for (const behavior of kBehaviors) {
  if (window.internals) {
    internals.settings.setEditingBehavior(behavior);
    internals.settings.setSelectTrailingWhitespaceEnabled(behavior !== 'mac');
  }

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">|\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">^\u05D6\u05D7\u05D8| \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">^\u05D6\u05D7\u05D8 |\u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-0 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6|\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6^\u05D7\u05D8| \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6^\u05D7\u05D8 |\u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-1 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7|\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7^\u05D8| \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7^\u05D8 |\u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-2 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8| \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ \u1497\u1498\u1499| \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ |\u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-3 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 |\u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 ^\u1497\u1498\u1499| \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 ^\u1497\u1498\u1499 |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-4 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497|\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497^\u1498\u1499| \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497^\u1498\u1499 |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-5 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498|\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498^\u1499| \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498^\u1499 |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-6 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499| \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ \u1500\u1501\u1502| \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-7 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 ^\u1500\u1501\u1502| \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 ^\u1500\u1501\u1502 |\'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-8 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500|\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500^\u1501\u1502| \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500^\u1501\u1502 |\'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-9 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501|\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501^\u1502| \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501^\u1502 |\'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-10 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502| \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502^ \'\u202Athey| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502^ \'\u202Athey |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-11 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 |\'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 ^\'\u202Athey| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 ^\'\u202Athey |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-12 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'|\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'^\u202Athey| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'^\u202Athey |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-13 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202A|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202A^they| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202A^they |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-14 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202At|hey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202At^hey| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202At^hey |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-15 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Ath|ey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Ath^ey| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Ath^ey |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-16 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athe|y said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athe^y| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athe^y |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-17 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-18 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey ^said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey ^said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-19 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey s|aid "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey s^aid| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey s^aid |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-20 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey sa|id "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey sa^id| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey sa^id |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-21 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey sai|d "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey sai^d| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey sai^d |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-22 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said^ "\u202Bcar| \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said^ "\u202Bcar |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-23 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said ^"\u202Bcar| \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said ^"\u202Bcar |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-24 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "|\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "^\u202Bcar| \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "^\u202Bcar |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-25 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202B|car \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202B^car| \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202B^car |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-26 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bc|ar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bc^ar| \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bc^ar |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-27 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bca|r \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bca^r| \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bca^r |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-28 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar| \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-29 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar ^\u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar ^\u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-30 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3|\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3^\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3^\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-31 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4|\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4^\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4^\u05D5 |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-32 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  behavior === 'mac'
      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C"\u202C\'?|</div>`
      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  `${behavior} 19-33 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 ^\u05D0\u05D1\u05D2\u202C"\u202C\'?|</div>`,
  `${behavior} 19-34 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0|\u05D1\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0^\u05D1\u05D2\u202C"\u202C\'?|</div>`,
  `${behavior} 19-35 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1|\u05D2\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1^\u05D2\u202C"\u202C\'?|</div>`,
  `${behavior} 19-36 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2|\u202C"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2^\u202C"\u202C\'?|</div>`,
  `${behavior} 19-37 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C|"\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C^"\u202C\'?|</div>`,
  `${behavior} 19-38 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"|\u202C\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"^\u202C\'?|</div>`,
  `${behavior} 19-39 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C|\'?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C^\'?|</div>`,
  `${behavior} 19-40 ltr forward word`);

selection_test(
  `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'|?</div>`,
  selection => selection.modify('extend', 'forward', 'word'),
  `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'^?|</div>`,
  `${behavior} 19-41 ltr forward word`);
}
</script>
